FROM registry-jinan-lab.inspurcloud.cn/service/devops/runtime/openjdk:1.8.0_276
WORKDIR /usr/lib
ADD ./buyer-api/target/ ./cnpCA.crt /usr/lib
RUN keytool -import -alias cnpCA -file /usr/lib/cnpCA.crt -keystore /etc/ssl/certs/java/cacerts -trustcacerts -storepass changeit -noprompt
ENV TZ=Asia/Shanghai
RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
RUN echo "Asia/Shanghai" > /etc/timezone
LABEL workdir="/usr/lib" exposeports="7075" cmdopts=""
EXPOSE 7081
RUN echo "java \$JAVA_OPTS  -jar /usr/lib/buyer-api-4.2.4.jar" >> /usr/bin/devops/setjavaopts.sh
RUN git config --global http.sslVerify false
ENTRYPOINT ["/usr/bin/devops/setjavaopts.sh"]
